﻿CREATE TABLE [dbo].[ClassDepartments]
(
	[SchoolYearID] INT NOT NULL, 
    [ClassID] INT NOT NULL PRIMARY KEY, 
    [DepartmentID] INT NOT NULL
	CONSTRAINT FK_ClassDepartments_Departments FOREIGN KEY ([DepartmentID]) 
    REFERENCES Departments ([DepartmentID]) 
    ON DELETE CASCADE
    ON UPDATE CASCADE,
	CONSTRAINT FK_ClassDepartments_Classes FOREIGN KEY ([ClassID]) 
    REFERENCES Classes ([ClassID]) 
    ON DELETE CASCADE
    ON UPDATE CASCADE
)
